import Vue from 'vue'
import App from './App.vue'

import VueRouter from 'vue-router'

Vue.use(VueRouter)

import Home from './views/Home'
import News from './views/News'
import PE from './views/PE'
import PEIndex from './views/child/PEIndex'
import PEChina from './views/child/PEChina'
import PEAbroad from './views/child/PEAbroad'

const routes = [
  {
    path: '/',
    redirect: '/home'
  },
  {
    path: '/home',
    component: Home
  },
  {
    path: '/news',
    component: News
  },
  {
    path: '/pe',
    component: PE,
    children: [
      {
        path: '/',
        redirect: 'peindex'
      },
      {
        path: 'peindex',
        component: PEIndex
      },
      {
        path: 'pechina',
        component: PEChina
      },
      {
        path: 'peabroad',
        component: PEAbroad
      }
    ]
  }
]
const router = new VueRouter({
  routes
})
Vue.config.productionTip = false

new Vue({
  router,
  render: h => h(App),
}).$mount('#app')
